home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
cool
/
ge_cool.lha
/
GE_COOL2.1
/
src
/
Stack
/
TODO
< prev
Wrap
Text File
|
1992-04-22
|
693b
|
26 lines
File: Stack.h
Fix memory leak, in &=, |=, ^=, -=.
The leak comes from returning by value, a stack allocated on the heap.
The stack is copied and returned, and the one on the heap is never deleted.
DONE
Add a general purpose protected grow method
DONE
push pushn
use the grow method.
DONE
operator==, find, position
These sit in a loop calling (*this->compare). Instead, make this->compare
default to NULL, and have two loops: one for the default case where
operator== on the value type is used, and another calling (*this->compare).
DONE
Stack<Type>(int n, Type* data)
Write a new constructor which makes a fixed size Stack which shares
storage with the data argument.
DONE